
<div class="main-header">
    <div class="btn-list">
        <a ng-if="roleid!=6" href="javascript:void(0)" id="newItem" ng-click="edit()">
            <span class="glyphicon glyphicon-plus"></span>临时维修任务
        </a>
    </div>
</div>
<div class="main-con">
    <div class="row">
        <!--list -->
        <div class="col-xs-4">
            <search-box search-data="searchData" search-submit="getServicingList(true)"></search-box>
            <div class="result-bar">
                共<span class="mColor" ng-bind="count"></span>条记录
            </div>
            <div class="lft-wrap box-shadow" when-scrolled="getServicingList()" >
                <ul class="data-list" repeat-list="getRgtModel()" active-id="{{activeId}}">
                    <li ng-repeat="item in servicingList track by $index" relativeId="{{item.Id}}" ng-class="{active:$index==0}">
                        <div class="media-left">
                            <div class="icon-box" ng-class="{gray:!item.Icon}">
                                <img ng-if="item.Icon" class="media-object img-circle" alt="" width="60" height="60" ng-src="{{item.Icon}}">
                                <i ng-if="!item.Icon" class="glyphicon glyphicon-cog"></i>
                            </div>
                        </div>

                        <div class="media-body">
                            <div class="panel-info">
                                <dl>
                                    <dt>维修任务编号:</dt>
                                    <dd ng-bind="item.Id"></dd>
                                </dl>
                                <dl>
                                    <dt>状态:</dt>
                                    <dd>
                                        <span class="statu-txt" ng-bind="MissionStatus|getEmunName:item.MissionStatus"></span>
                                    </dd>
                                </dl>
                                <dl>
                                    <dt>来源:</dt>
                                    <dd ng-bind="MissionFromType|getEmunName:item.MissionFromType">
                                    </dd>
                                </dl>
                                <dl>
                                    <dt>紧急程度:</dt>
                                    <dd>
                                        <span class="level-txt" ng-bind="MissionLevel|getEmunName:item.MissionLevel"></span>
                                    </dd>
                                </dl>
                            </div>
                        </div>
                        <div class="media-right">
                            <div ng-if="roleid!=6" class="btn-wrap">
                                <a href="javascript:void(0)" ng-class="{disabled:item.MissionStatus==10||item.MissionStatus==11}" title="终止" ng-click="servicingStop(item,11);$event.stopPropagation();">
                                    <span class="glyphicon glyphicon-stop"></span>
                                </a>
                                <!--<a href="javascript:void(0)" title="删除" ng-click="del(item,$index);$event.stopPropagation();">
                                    <span class="glyphicon glyphicon-trash"></span></a>-->
                                <!-- <a href="javascript:void(0)" ng-click="mission(item)"><span class="glyphicon glyphicon-share-alt" title="派发"></span></a>
                                <a href="javascript:void(0)" ng-click="dispatchDanger(item.DangerStatus)"><span class="glyphicon glyphicon glyphicon-arrow-left" title="撤销"></span></a>
                                <a href="javascript:void(0)" ng-click="destroyDanger(item.DangerStatus)"><span class="glyphicon glyphicon-check" title="审核"></span></a> -->
                            </div>
                        </div>
                    </li>
                </ul>
            </div>
        </div>
        <!--内容块-->
        <div class="col-xs-8">
            <div class="rgt-wrap box-shadow">
                <div class="widget flat radius-bordered">
                    <tabset flat="true">
                        <tab heading="位置信息">
                            <div ng-show="activeId">
                                <wtmap-set-location option="setLocationOption" position="servicingDetailModel.currentPosion"></wtmap-set-location>
                            </div>
                        </tab>
                        <tab heading="详细信息">
                            <div ng-show="activeId">
                                <div class="row">
                                    <div class="panel-info report">
                                        <dl>
                                            <dt>维修任务编号:</dt>
                                            <dd ng-bind="servicingDetailModel.Id"></dd>
                                        </dl>
                                        <dl>
                                            <dt>状态:</dt>
                                            <dd ng-bind="MissionStatus|getEmunName:servicingDetailModel.MissionStatus">
                                            </dd>
                                        </dl>
                                        <dl>
                                            <dt>紧急程度:</dt>
                                            <dd ng-bind="MissionLevel|getEmunName:servicingDetailModel.MissionLevel"></dd>
                                        </dl>
                                        <dl>
                                            <dt>处理人:</dt>
                                            <dd ng-bind="servicingDetailModel.HandlerName"></dd>
                                        </dl>
                                        <dl>
                                            <dt>创建时间:</dt>
                                            <dd ng-bind="servicingDetailModel.CreateTime | date : 'yyyy-MM-dd HH:mm:ss'"></dd>
                                        </dl>
                                        <dl>
                                            <dt>创建人:</dt>
                                            <dd ng-bind="servicingDetailModel.User"></dd>
                                        </dl>
                                        <!--
                                        <dl>
                                            <dt>来源:</dt>
                                            <dd ng-bind="MissionFromType|getEmunName:servicingDetailModel.MissionFromType"></dd>
                                        </dl>
                                        <dl>
                                            <dt>来源编号:</dt>
                                            <dd class="target-box">
                                                <a href="javascript:void(0)" ng-repeat="item in servicingDetailModel.Items track by $index" ng-click="detail(item.TargetId)">
                                                    <span class="targetCode-box" ng-bind="item.TargetCode"></span>
                                                </a>
                                            </dd>
                                        </dl>-->
                                        <dl>
                                            <dt>维修要点:</dt>
                                            <dd ng-bind="servicingDetailModel.Note"></dd>
                                        </dl>
                                    </div>
                                    <div class="thumbs" id="servicingThumbs">
                                        <a target-href="{{item.Url}}" style="background-image:url({{item.Url}})" thumbs-list="servicingThumbs" ng-repeat="item in rgtservicingDetailModel.Imgs track by $index"></a>
                                    </div>
                                </div>
                                <div class="row" ng-if="servicingDetailModel.MissionFromType==2">
                                    <div class="panel-info report">
                                        <dl>
                                            <dt>隐患编号:</dt>
                                            <dd ng-bind="dangerDetailModel.Code"></dd>
                                        </dl>
                                        <dl>
                                            <dt>状态:</dt>
                                            <dd ng-bind="DangerStatus|getEmunName:dangerDetailModel.DangerStatus">
                                            </dd>
                                        </dl>
                                        <!--<dl>
                                            <dt>隐患位置:</dt>
                                            <dd ng-bind="dangerDetailModel.Addr"></dd>
                                        </dl>-->
                                        <dl>
                                            <dt>上报时间:</dt>
                                            <dd ng-bind="dangerDetailModel.CreateTime | date : 'yyyy-MM-dd HH:mm:ss'"></dd>
                                        </dl>
                                        <dl>
                                            <dt>上报人员:</dt>
                                            <dd ng-bind="dangerDetailModel.HandlerName"></dd>
                                        </dl>
                                        <dl>
                                            <dt>紧急程度:</dt>
                                            <dd ng-bind="MissionLevel|getEmunName:dangerDetailModel.MissionLevel"></dd>
                                        </dl>
                                        <dl>
                                            <dt>类型:</dt>
                                            <dd ng-bind="dangerDetailModel.DangerType"></dd>
                                        </dl>
                                        <dl>
                                            <dt>隐患主题:</dt>
                                            <dd ng-bind="dangerDetailModel.Name"></dd>
                                        </dl>
                                        <dl>
                                            <dt>隐患描述:</dt>
                                            <dd ng-bind="dangerDetailModel.Note"></dd>
                                        </dl>
                                    </div>
                                    <div class="thumbs" id="servicingThumbs">
                                        <a target-href="{{item.Url}}" style="background-image:url({{item.Url}})" thumbs-list="servicingThumbs" ng-repeat="item in dangerDetailModel.Imgs track by $index"></a>
                                    </div>
                                </div>
                            </div>
                        </tab>
                        <tab heading="维修反馈">
                            <div ng-show="activeId">
                                <div class="row feedback-list" ng-repeat="feedback in feedbackList track by $index">
                                    <div class="panel-info report">
                                        <dl>
                                            <dt>维修反馈编号:</dt>
                                            <dd ng-bind="feedback.MissionDetailId"></dd>
                                        </dl>
                                        <dl ng-if="$index==0&&roleid!=6">
                                            <div class="radio">
                                                <label>
                                                    <input ng-disabled="feedback.MissionStatus!=2" name="form-field-radio" type="radio" class="colored-azure" value="10" ng-model="feedback.MissionStatus" ng-click="audit(feedback)">
                                                    <span class="text">审核通过</span>
                                                </label>
                                            </div>
                                            <div class="radio">
                                                <label>
                                                    <input ng-disabled="feedback.MissionStatus!=2" name="form-field-radio" type="radio" class="colored-azure" value="1" ng-model="feedback.MissionStatus" ng-click="audit(feedback)">
                                                    <span class="text">重新维修</span>
                                                </label>
                                            </div>
                                        </dl>
                                        <dl class="width">
                                            <dt>处理人:</dt>
                                            <dd ng-bind="feedback.HandlerName"></dd>
                                        </dl>
                                        <dl class="width">
                                            <dt>提交时间:</dt>
                                            <dd ng-bind="feedback.CreateTime"></dd>
                                        </dl>
                                        <dl class="width">
                                            <dt>反馈描述:</dt>
                                            <dd ng-bind="feedback.Note"></dd>
                                        </dl>
                                    </div>
                                    <div class="thumbs" id="feedback{{$index}}">
                                        <a target-href="{{imgItem.Url}}" style="background-image:url({{imgItem.Url}})" thumbs-list="feedback{{$parent.$index}}" ng-repeat="imgItem in feedback.Imgs track by $index"></a>
                                    </div>
                                </div>
                            </div>
                        </tab>
                    </tabset>
                </div>
            </div>
        </div>
    </div>
</div><!-- 编辑设施信息 -->
<div class="modal fade" id="editModal">
    <div class="modal-dialog">
        <form name="servicingForm" ng-submit="servicingFormSubmit()" novalidate>
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal">
                        <span aria-hidden="true">&times;</span> <span class="sr-only">Close</span>
                    </button>
                    <h4 class="modal-title" ng-bind="editModalTitle"></h4>
                </div>
                <div class="modal-body">
                    <!-- <div class="form-group" ng-class="{ 'has-error' : servicingForm.Remark.$dirty&&servicingForm.Remark.$invalid}">
                        <div class="input-icon icon-right">
                            <input name="Remark" type="text" class="form-control" ng-model="servicingModel.Remark" placeholder="维修任务编号" required>
                            <p ng-show="servicingForm.Remark.$dirty && servicingForm.Remark.$error.required" class="help-block">维修任务编号是必需的，并且不能是空的</p>
                        </div>
                    </div> -->
                    <div class="form-group" ng-class="{ 'has-error' : servicingForm.MissionLevel.$dirty&&servicingForm.MissionLevel.$invalid}">
                        <div class="input-icon icon-right">
                            <select name="MissionLevel" class="form-control" ng-model="servicingModel.MissionLevel" ng-options="value as key for (key ,value) in MissionLevel" required>
                                <option value="" disabled selected>请选择(紧急程度)</option>
                            </select>
                            <p ng-show="servicingForm.MissionLevel.$dirty && servicingForm.MissionLevel.$error.required" class="help-block">紧急程度是必需的，并且不能是空的</p>
                        </div>
                    </div>
                    <div class="form-group" ng-class="{ 'has-error' : servicingForm.HandlerId.$dirty&&servicingForm.HandlerId.$invalid}">
                        <div class="input-icon icon-right">
                            <select name="HandlerId" class="form-control" ng-disabled="id" ng-model="servicingModel.HandlerId" ng-options="item.Id as item.Name for item in userList" required>
                                <option value="" disabled selected>请选择(处理人员)</option>
                            </select>
                            <p ng-show="servicingForm.HandlerId.$dirty && servicingForm.HandlerId.$error.required" class="help-block">处理人员的，并且不能是空的</p>
                        </div>
                    </div>
                    <div class="form-group" ng-class="{ 'has-error' : servicingForm.Note.$dirty&&servicingForm.Note.$invalid}">
                        <div class="textarea-box">
                            <textarea name="Note" placeholder="维修要点" ng-model="servicingModel.Note" required></textarea>
                            <p ng-show="servicingForm.Note.$dirty && servicingForm.Note.$error.required" class="help-block">维修要点是必需的，并且不能是空的</p>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="submit" class="btn btn-primary" ng-disabled="servicingForm.$invalid">确定</button>
                    <button type="button" class="btn btn-warning" data-dismiss="modal">取消</button>
                </div>
            </div>
        </form>
    </div>
</div>

<!-- 删除用户 -->
<div class="modal fade" id="delModal">
    <div class="modal-dialog modal-sm">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">
                    <span aria-hidden="true">&times;</span> <span class="sr-only">Close</span>
                </button>
                <h4 class="modal-title">确定删除吗?</h4>
            </div>
            <div class="modal-body">
                <div class="panel-info">
                    <dl>
                        <dt>Id:</dt>
                        <dd ng-bind="delModel.Id"></dd>
                    </dl>
                    <dl>
                        <dt>紧急程度:</dt>
                        <dd ng-bind="MissionLevel|getEmunName:delModel.MissionLevel">
                        </dd>
                    </dl>
                    <dl>
                        <dt>处理人:</dt>
                        <dd ng-bind="delModel.HandlerName"></dd>
                    </dl>
                    <dl>
                        <dt>上报时间:</dt>
                        <dd ng-bind="delModel.StartAt"></dd>
                    </dl>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-warning" data-dismiss="modal">取消</button>
                <button type="button" class="btn btn-primary" ng-click="delConfirm()">确定</button>
            </div>
        </div>
    </div>
</div>
<!-- 来源编号 -->
<div class="modal fade" id="detailModal">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">
                    <span aria-hidden="true">&times;</span> <span class="sr-only">Close</span>
                </button>
                <h4 class="modal-title">来源编号</h4>
            </div>
            <div class="modal-body">
                <div class="panel-info report">
                    <dl>
                        <dt>隐患编号:</dt>
                        <dd ng-bind="dangerDetailModel.Code"></dd>
                    </dl>
                    <dl>
                        <dt>状态:</dt>
                        <dd ng-bind="DangerStatus|getEmunName:dangerDetailModel.DangerStatus">
                        </dd>
                    </dl>
                    <!-- <dl>
                        <dt>隐患位置:</dt>
                        <dd ng-bind="dangerDetailModel.Addr"></dd>
                    </dl> -->
                    <dl>
                        <dt>上报时间:</dt>
                        <dd ng-bind="dangerDetailModel.CreateTime | date : 'yyyy-MM-dd HH:mm:ss'"></dd>
                    </dl>
                    <dl>
                        <dt>上报人员:</dt>
                        <dd ng-bind="dangerDetailModel.HandlerName"></dd>
                    </dl>
                    <dl>
                        <dt>紧急程度:</dt>
                        <dd ng-bind="MissionLevel|getEmunName:dangerDetailModel.MissionLevel"></dd>
                    </dl>
                    <dl>
                        <dt>隐患描述:</dt>
                        <dd ng-bind="dangerDetailModel.Note"></dd>
                    </dl>
                </div>
            </div>
        </div>
    </div>
</div>

